package model

import (
	"time"
)

type RuleDepartment struct{
	RuleDepartmentId int `xorm:"pk autoincr"`
	DepartmentId int
	RuleDepartmentName string
	RuleId int
	CreatedAt time.Time
	UpdatedAt time.Time
}

func (rd *RuleDepartment)QueryRuleDepartment(dId int, rId int) *RuleDepartment{
	var rdv *RuleDepartment
	_, err := x.Where("rule_id = ?", rId).And("rule_department_td = ?", dId).Get(&rdv)
	if err != nil{
		return nil
	}
	return rdv
}